1. Field of Invention
Embodiments of the invention generally relate to graphics systems, and in particular to display controllers employed in graphics processing systems.
2. Discussion of Related Art
Display controllers are often used in computer systems to output and format surfaces to a display monitor. In general, the display controller is included in graphics processing systems.
FIG. 1, illustrates an example of a system 10 including a set 11 of processing units 1, 2 . . . N, a memory unit 12 and a graphics processing system 13 used to generate images for display on a display device 14 (e.g., screen, display, monitor, etc.). The system 10 may also include a bus 15 that interconnects various elements of the system 10. The graphics processing system 13 may receive instructions from an application running on at least one of the processing units 11 to generate a virtual image or to process graphics or video data for display on the display device 14. The graphics processing system 13 may be used to display images on more than one display device and each of the devices may be of different types (TV, wall, monitor, etc). In some embodiments, one or more of the display devices may be included in a video processing system. In a version of these embodiments, the video processing system may include a video recorder and/or monitor. In some embodiments, the processing units 11 may include a host processor (commonly referred to as a CPU). System 10 may also include dedicated processing units such as a video editing processor and/or an image processing unit among the set of processing units 11.
As illustrated in FIG. 1, a graphics processing system 13 may include an interface 21, a graphics processor 22, a video memory 23, a display controller 24 and an output port 25. The video memory may be external to the graphics processing system 13. The video memory 23 may store instructions and data sent by an application running on one of the plurality of processing units 11. Further the video memory may store intermediate data while it is being processed in the graphics processor or may store processed data once the processing is completed. In general, the interface 21 is used to connect the graphics processing system 13 to the processing units 11 and the memory 12 through the bus 15. The graphics processor 22 may receive data and instructions through the interface 21. Once processed, data is stored in the video memory 23 as a surface and is output by the display controller 24 to the display device 14. The display controller 24 may receive control data through interface 21. The display controller 24 may be configured by a driver to output a surface from the video memory 23 through the output port 25 and to format the surface according to the monitor's parameters (e.g., device resolution, refresh rate, etc.) such that it includes all synchronization signals. These parameters may be defined at an initialization step, when the system 10 is switched on, or they may be defined by a user at any moment during the system's run time. A surface provided from the output port 25 may be referred to as an image because the surface is formatted by the display controller to be suitable for display on a display device. Further, as used herein the terms “surface”, and “video surface” refer to a set of pixels intended for display together on a display device where each pixel is associated with a set of color components. The term “image” as used herein refers to a surface which is formatted for display. In some graphics processing systems there may be a plurality of display controllers.
In general, image data is stored in video memory as a set of pixels forming a surface and each pixel is associated to a plurality of attributes such as color components and Alpha value. An Alpha value may indicate the transparency of a pixel. Color components of a pixel may be represented in a variety of color spaces. RGB, YUV, YCbCr or grayscale are examples of color spaces. Color components may have different formats. For example, if data is represented in RGB color space, the three color components may include 10 bits of data each, 12 bits or 24 bits of data each, etc. Alternatively, the red color component may include 8 bits of data while the two other components, green and blue, may include 10 bits of data. One may note that for each color space there may be different color component formats for the various color components.
In some embodiments, color components of a pixel may need to be modified before being displayed or output from the graphics controller. In some applications, a surface is processed according to a non-linear function. In one embodiment, a non-linear function may be used to highlight a portion of a surface to better view the selected portion on a display device. In another embodiment a set of color components may be processed in order to put emphasis on some details of a surface when displayed on a display device. In a different embodiment non-linear functions may be used to apply a threshold on color components of a surface. In this example, pixels of the surface with color components equal to or higher than a threshold are displayed. Non-linear functions are complex and may be implemented using a dedicated hardware module in the graphics controller. For example memory blocks organized as look up tables may be used to implement non-linear functions.
In some prior art approaches, the display controller includes a single hardware look up table. In these examples the look up table is configured to include elements of a non-linear function. During the processing step of the prior art, the set of color components associated with a pixel is used as an index to access an element of the non-linear function stored in the look up table. The element retrieved from the look up table contains new values of color components associated with the pixel. In an example where each pixel includes three components of 10 bits each, each one of these color components may have 1024 possible values. Consequently, the look up table should include 1024×1024×1024 locations to store the 1024×1024×1024 values of the non-linear function. In this example, the color components of a pixel are used as an index of 30 bits to access a location in the look up table configured with a non-linear function of 1024×1024×1024 values. This requires a large memory block to store the lookup table and may require a significant amount of processing time to configure the look up table with the non-linear function.
In some other prior art approaches, the graphics controller may include three separate hardware look up tables where each one of them is dedicated to process one color component of a pixel. This approach may be more efficient and necessitates less hardware real estate, since each look up table needs to store a number of locations sufficient to process only a single color component. For example, if a surface is represented in a RGB color space and each color component of a pixel corresponds to 10 bits of data, the first 10 bits of a pixel may be used to access a location in a first look up table, the following 10 bits of the same pixel may be used to access a location in a second look up table and the last 10 bits of the same pixel may be used to access a location in a third look up table. The three processed color components retrieved from the different look up tables are further transferred to another processing module or output from the graphics system.
The size of a pixel, for example, the number of bits included in a pixel affects the degree of precision with which the pixel can be represented. In general, the larger the pixel the greater degree of precision and/or accuracy with which the pixel can be processed for display. In prior art approaches, the precision with which a pixel can be processed is sometimes limited by the number of locations that a look up table or the set of look up tables may include or by the number of bits that may be stored at each location of a look up table. That is, in prior approaches, the size of a look up table provides the number of bits that can be used by a display controller to process a pixel. For example, a graphics controller can include three look up tables, where each one has 1024 locations. If the data processed is represented by three color components of 12 bits there will be only 1024 locations available for storing elements of a non-linear function to process each color component instead of the 4096 locations required. In other embodiments, the memory used to store the look up table may be sufficiently large as to include all possible values of a non-linear function to process the largest pixel that may be processed by a graphics system. However since in most cases a graphics system does not process large pixels, there will be a huge loss of hardware real estate that could otherwise have been used for other critical processing modules of the graphics system.
In addition, prior approaches employ a fixed quantity of look up tables each having a fixed size in a display controller. These approaches provide an inflexible configuration that can only process pixels with a fixed number of functions which are limited in size.